<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>灯泡</title>
    <script >
        var person ={name:'李白',age:12}
        function array() {
            document.getElementById('text').innerHTML=person.name
        }
    </script>
</head>
<body>
    <h1 id="text" onclick="array()">哈哈</h1>

</body>
</html>